package com.ruoyi.auth.controller;

import cn.hutool.core.util.RandomUtil;
import com.ruoyi.auth.service.SmsService;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.utils.SendSmsUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/sms")
public class SmsController {

    @Autowired
    private SmsService smsService;



    @PostMapping("/sendSms")
    public R sendSms(@RequestBody Map<String, String[]> body)
    {
        String[] phoneNumbers = body.get("phoneNumber");
        return smsService.sendSms(phoneNumbers);
    }

}
